<template>
  <div class="radio-recommand-list">
    <RadioRecommandListItem v-bind:list="radioList"></RadioRecommandListItem>
  </div>
</template>

<script>
  import RadioRecommandListItem from "./RadioRecommandListItem";
  import {getRadioRecommand} from '../../../network/radio'
    export default {
        name: "RadioRecommandList",
        components:{
            RadioRecommandListItem,
        },
        data(){
            return{
                picUrl:'',
                name:'',
                idx:0,
                copywriter:'',
                radioList:[],
                radioitem:{},
            }
        },
        created() {
            getRadioRecommand().then(res=>{
                // console.log(res)
                for(let item of res.data.result){
                    this.picUrl = item.picUrl
                    this.name = item.name
                    this.copywriter = item.copywriter
                    this.idx = item.id
                    this.radioitem = {
                        picUrl:this.picUrl,
                        name:this.name,
                        copywriter:this.copywriter,
                        idx:this.idx,
                    }
                    this.radioList.push(this.radioitem)
                }

            })
        }
    }
</script>

<style scoped>
  .radio-recommand-list{

    margin-top: 20px;
  }
</style>